<!--
 * @Author: your name
 * @Date: 2021-07-21 15:55:53
 * @LastEditTime: 2021-10-18 15:58:04
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \usp-osm-frondend\src\views\orderCenter\components\remarks.vue
-->
<template>
    <el-dialog
      title="查看备注"
      :visible.sync="isShow"
      width="80%"
      top="0"
      append-to-body
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :wrapperClosable="false"
      destroy-on-close
      :before-close="handleClose">
      <el-table :data="tableData" v-loading="loading">
        <el-table-column
          label="操作人"
          prop="operationName"
          align="center"
          min-width="120"
          :show-overflow-tooltip="true"
        ></el-table-column>
        <el-table-column
          label="操作时间"
          prop="createTime"
          align="center"
          min-width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            {{ scope.row.createTime | timestampToChange('time') }}
          </template>
        </el-table-column>
        <el-table-column
          label="审核类型"
          prop="type"
          align="center"
          min-width="120"
          :show-overflow-tooltip="true"
        >
        <template slot-scope="scope">
          {{ getDictionaryNameByCode('AUDITTYPE', scope.row.type ) }}
        </template>
        </el-table-column>
        <el-table-column
          label="审核结果"
          prop="statue"
          align="center"
          min-width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span>{{getDictionaryNameByCode('RESULTAUDIT', scope.row.statue)}}</span>
          </template>
        </el-table-column>
        <!-- 运费承担方 -->
        <el-table-column
          label="运费承担方"
          prop="statue"
          align="center"
          min-width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span>{{scope.row.freightBuyer}}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="备注信息"
          prop="remark"
          align="center"
          min-width="120"
          :show-overflow-tooltip="true"
        ></el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="handleClose" class="white-btn">取消</el-button>
      </span>
    </el-dialog>
</template>
<script>
import { mapGetters } from 'vuex'
import { common } from '@/mixins/common'
export default {
  name: 'remarksDialog',
  props: ['tableData', 'isShow', 'loading'],
  mixins: [common],
  computed: {
    ...mapGetters(['lookupItems'])
  },
  data () {
    return {}
  },
  methods: {
    handleClose () {
      this.$parent.showRemarks = false
    }
  }
}
</script>
